import java.util.*;

/**
 * @author zhu_shuai
 * @since 2021/6/20
 */
public class ListDemo {
    public static void main(String[] args) {
        System.out.println("-------Vector---------");
        Vector<String> vector = new Vector<>();
        vector.add("a");
        vector.addElement("b");
        vector.add(null);
        vector.forEach(System.out::println);
        System.out.println("-------linkedList---------");
        LinkedList<String> linkedList = new LinkedList<>();
        linkedList.add("a");
        linkedList.add("b");
        linkedList.add("c");
        linkedList.add("d");
        linkedList.forEach(System.out::println);

        System.out.println("-------linkedHashSet---------");
        LinkedHashSet<String> linkedHashSet = new LinkedHashSet();
        linkedHashSet.add("1");
        linkedHashSet.add("2");
        linkedHashSet.add("3");
        linkedHashSet.forEach(System.out::println);

        Collection<String> strings = Collections.synchronizedCollection(linkedHashSet);
    }
}
